package cn.hss.object.dt;

/**
 * @author 作者：HeShaoShuai
 * @Email 邮箱：2569819541@qq.com
 * @Date 日期：2023/4/25 17:23
 * @Package 包名：cn.hss.object.dt
 * @Project 项目名：JavaSE
 * @Version 1.0
 */
public class Order {
	private int orderId=1002;
	private String orderName;

	@Override
	public String toString() {
		return
				"订单编号" + orderId +
						", 订单名称'" + orderName;
	}

	@Override
	public boolean equals(Object o) {
		if(this==o){
			return true;
		}
		if(o instanceof Order){
			Order order=(Order) o;
			return this.orderId==order.orderId &&
					this.orderName.equals(order.orderName);
		}
		return false;
	}

	public Order(int orderId, String orderName) {
		this.orderId = orderId;
		this.orderName = orderName;
	}

	public int getOrderId() {
		return orderId;
	}

	public void setOrderId(final int orderId) {
		this.orderId = orderId;
	}

	public String getOrderName() {
		return orderName;
	}

	public void setOrderName(final String orderName) {
		this.orderName = orderName;
	}
}
